<template>
  <div :style="[activeClass, borderClass]"></div>
  <div :style="[isActive? activeClass: '', borderClass]"></div>
  <div :style="[{
        backgroundColor: '#f60',
        height: '100px',
        width:'100px'
    }, borderClass]"></div>
</template>

<script setup>
    import { ref, reactive } from 'vue';
    const isActive = ref(true); // 让第二个不处于激活态
    const activeClass = reactive({
        backgroundColor: 'rgb(59,192,241)',
        height: '100px',
        width:'100px'
    })
    const borderClass = reactive({
        border: '2px solid black'
    })
</script>

<style>

</style>